﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyVouchers.aspx.cs" Inherits="AiRiZu.User.MyVouchers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>
	爱日租—全球最时尚、最具先锋概念的房屋日租、短租服务网站！
</title>
<meta content="爱日租,日租,短租,租房,家庭公寓,自助公寓,家庭旅馆,旅游" name="keywords"/>
<meta content="爱日租是国内首家专注房屋短期租赁的信息发布和在线交易的网站，为房主和租户搭建起最值得信赖的沟通和交易平台" name="description"/>

<link rel="stylesheet" href="css/css.css" />


<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/pixie.css" />



<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main"/>
<link rel="stylesheet" href="css/dashboard.css" />

<link rel="stylesheet" href="css/voucher.css" />

<link rel="shortcut icon"
	href="/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript"
	src="../js/jquery.min.js"></script>
<script type="text/javascript"
	src="../js/jquery-ui.min.js"></script>
<script type="text/javascript"
	src="/js/application6.js"></script>
<script type="text/javascript"
	src="/js/home.js"></script>
<script type="text/javascript"
	src="/js/translate.js"></script>
<script type="text/javascript"
	src="/js/s_code.js?vid=1"></script>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main"/>
<link rel="stylesheet" href="/css/dashboard.css" />

<script type="text/javascript">

	getCurrencyInfo();
	
	function showCurrencyInfo(curAction) {
		
		var curId = $("#currencyId").val();
		var userId = $("#userId").val();

		if(curId == "" || curId == null) {
			alert("您目前还没有租币，可以通过邀请好友获得租币！")
			return false;
		}
		
		$.ajax({
			   type: 'POST',
			   url: '/ajax/' + curAction,
			   data: 'curId=' + curId + '&userId=' + userId,
			   success: function(msg){
			   	   if(msg != 'error') {
				   	 if(curAction == 'getTotalCurrencyInfo') {
				   		$("#totalCurrencyTable").html(msg)
				   		$("#totalCurrency").css("display", "block")
				     } else {
					   	$("#usedCurrencyTable").html(msg)
					   	$("#usedCurrency").css("display", "block")
				     }
			   	   } else {
			   		 if(curAction == 'getTotalCurrencyInfo') {
						alert("您目前还没有租币，可以通过邀请好友获得租币！")
				   	 } else {
				   		alert("您目前还没有已用租币信息！")
				     }
				   }
			   }
			 });
	}

	function getCurrencyInfo() {
		var curId = "8659";
		if(curId == "" || curId == null) {
			return false;
		}
		
		$.ajax({
			   type: "POST",
			   url: "/ajax/getCurrencyTypeInfo",
			   data: 'curId=' + curId,
			   success: function(msg){
			   	   if(msg != 'error') {
			   	     $("#times1").html(msg.times1);
				   	 $("#times2").html(msg.times2);
				   	 $("#times3").html(msg.times3);
				   	 $("#times4").html(msg.times4);
				   	 $("#times5").html(msg.times5);
				   	 $("#times6").html(msg.times6);
				   	 $("#times7").html(msg.times7);
				   	 $("#times8").html(msg.times8);
				   	 $("#times9").html(msg.times9);
				   	 $("#times10").html(msg.times10);
				   	 $("#times11").html(msg.times11);
				   	 $("#times12").html(msg.times12);
				   	 $("#times13").html(msg.times13);

			   	     $("#amount1").html(msg.amount1);
				   	 $("#amount2").html(msg.amount2);
				   	 $("#amount3").html(msg.amount3);
				   	 $("#amount4").html(msg.amount4);
				   	 $("#amount5").html(msg.amount5);
				   	 $("#amount6").html(msg.amount6);
				   	 $("#amount7").html(msg.amount7);
				   	 $("#amount8").html(msg.amount8);
				   	 $("#amount9").html(msg.amount9);
				   	 $("#amount10").html(msg.amount10);
				   	 $("#amount11").html(msg.amount11);
				   	 $("#amount12").html(msg.amount12);
				   	 $("#amount13").html(msg.amount13);
			   	   }
			   }
			 });
	}
	
</script>



<script type="text/javascript">

//$(document).ready(function(){
//        opts = {};
//        AirbnbHomePage.init(opts);
//    });

function addEventHandler(target, type, func) { 
    if (target.addEventListener) 
        target.addEventListener(type, func, false); 
    else if (target.attachEvent) 
        target.attachEvent("on" + type, func); 
    else target["on" + type] = func; 
} 
addEventHandler(document, 'scroll', function() {
	document.getElementById('list_loading').style.top = $('body').scrollTop() + 'px';
});

function shiftLanguage(lang, country) {
	$.ajax({
		   type: "POST",
		   url: "/ajax/versionInternationalize",
		   data: 'lang=' + lang + '&country=' + country,
		   success: function(msg){
		   	   if(msg == 'success') {
		   	   	   window.location.reload(true);
		   	   }
		   }
		 });
}

//$(document).bind('click',function(event){  
//    var url = event.target.href;
//    if(event.target.parentNode.href) {
//		url = event.target.parentNode.href;
//    }
//    if(url && url.indexOf('http://') == 0) {
//    	if(url.indexOf("?") != -1 && (url.indexOf("/city") != -1 || url.indexOf("/list") != -1 || url.indexOf("/show") != -1)) {
//	    	post_to_url(url);
//	        event.preventDefault();  
//	        event.stopPropagation();
//    	}  
//    }  
//      
//},true);

function post_to_url(url) {
	var flag = false; // 目录到/room/show页面时是弹出新窗口，flag = false 不弹出，true是弹出
	if(url.indexOf("/room/show") != -1 && url.indexOf("?src=list") != -1){
        flag = true;
    }

    var form = document.createElement("form");
    var baseUrl = url.substring(0, url.indexOf("?"));
    var params = url.substring(url.indexOf("?") + 1, url.length);
    params = decodeURIComponent(params);
    params = params.replace("+", " ");
    var s = params.split("&");
    form.setAttribute("method", "post");
    form.setAttribute("action", baseUrl);
    for(var i = 0; i < s.length; i ++) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", s[i].split("=")[0].replace('locationSearch', 'location'));
        hiddenField.setAttribute("value", s[i].split("=")[1]);
        form.appendChild(hiddenField);
    }
    $('body').append(form);
    if(flag){
        form.target="_blank"; // /room/show 新窗口弹出
    }
    
    form.submit();
}
</script>

<!--google analytics-->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22185191-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</head>
<body>
	<div name="waitingDiv" id="waitingDiv" style="display: none;">
		<div id="list_loading" name="list_loading">
			<div id="list_loading_wrapper" class="rounded_more">
				<img src="/images/home_spinner.gif"
					style="display: block; float: left; padding: 0 12px 0 0;" />页面载入中...
			</div>
		</div>
	</div></div>
	<div class="header">
		<a class="logo" title="爱日租" href="/;jsessionid=0F84A550D26769620706A9DCBE383C6B"></a>
	  <div class="top_bar">
		<ul class="nav">
			
				<li>
				    <span class="SayHi"><%=Session["aliance"] != null? "嗨! " + Session["aliance"].ToString() : ""%></span>
				</li>
				
					<script type="text/javascript">

						loadUnReadMessages();
						function loadUnReadMessages(){
							$.ajax({
	   							type: "POST",
	   							url: "/ajax/userUnreadMessage",
	   							data: 1,
	   							success: function(result){
		   							$("#unReadMessages").text(result);
		   								
								}
	 						});	
						}
						//定时器
						setInterval("loadUnReadMessages()", 15000);
					
					
</script>

					<li><a href="DashBoard.aspx">用户中心</a> 
					</li>
					
					<li>
					<strong>
						<a href="/message/inbox?offset=0" class="message">
							<span id="unReadMessages"></span>
						</a>
					</strong>
					</li>
					
					<li class="rounded">
						<a href="/city?favorite=33591">
							收藏
							<span class="star" title="收藏" id="userFavorites"></span></a>
							<script type="text/javascript">

									$.ajax({
			   							type: "POST",
			   							url: "/ajax/userFavorite",
			   							data: 1,
			   							success: function(result){
				   							$("#userFavorites").text(result);
				   								
										}
			 						});
							
</script>

					</li>
				

				<li><a href="/user/logout">退出</a>
				</li>
				
			
				<li style="display:none"><span class="ChoLanguage selected">
					<a href="#none" id="language_selector_cn" onClick="shiftLanguage('zh', 'CN')">简体中文</a></span></li>
	            <li style="display:none"><span class="EngLanguage">
	            	<a href="#none" id="language_selector_en" onClick="shiftLanguage('en', 'US')">English</a></span></li>
	       <!-- 
	            <li style="font-size:20px;margin-top:-4px;">400-696-6656</li>
	      -->
			<!-- 人人网
			<li><a href="#"
				onclick="XN.Connect.requireSession(function(){window.location.href='/renren/login'});return false;">人人登录</a>
			</li>
			end-->
			<!--    <li><a>新手上路</a></li>
    <li><a>帮助</a></li>-->
			
			
		</ul>
		<a href="../SendRoom.aspx" class="btn list_your_space">
			<span>发布房间</span>
		</a>
		</div>
		<p class="customer_hot_line"><span>400-696-6656</span><a href="/media">媒体报道</a></p>
	</div>
	
<div id="command_center">
<input type="hidden" id="currencyId" name="currencyId" value="8659" />
<input type="hidden" id="userId" name="userId" value="33591" />
 <!--
	menu =>  dashboard,inbox,rooms,trips,account,recommend
 -->

<ul id="nav">
	<li id="dashboardmenu"><a href="dashboard.aspx">我爱日租</a></li>
	<li id="inboxmenu"><a href="Index.aspx">收件箱</a></li>
	<li id="roomsmenu"><a href="MyRooms.aspx">我的房间</a></li>
	<li id="tripsmenu"><a href="Trips.aspx">出行计划</a></li>
	<li id="accountmenu"><a href="Warnset.aspx">账户信息</a></li>
	<li id="commentsmenu"><a href="Comments.aspx">评价推荐</a></li>
	<li id="vouchersmenu"><a href="Vouchersinvite.aspx">赢取租币</a></li>
</ul>

	










<ul class="subnav">
	<li id="vouchersinvite_submenu"><a href="Vouchersinvite.aspx">邀请好友</a></li>
    <li id="myvouchers_submenu"><a href="MyVouchers.aspx">我的租币</a></li>
</ul>


<script type="text/javascript">

	var item=document.getElementById('vouchersmenu');
	if (item){
		item.className='active';		
	}
	item=document.getElementById('myvouchers_submenu');
	if (item){
		item.className='active';		
	}

</script>






  <div id="voucher_amount" class="box">
    <div class="top"></div>
    <div class="middle">
<h2>我的租币</h2>
<div class="total">
  <table width="280" border="0" cellspacing="0" cellpadding="0" class="amounttotal">
    <tr>
      <td align="center" valign="middle" class="clt">共获租币</td>
      <td align="center" valign="middle" class="cl2"><%=BTotal %></td>
      <td align="center" valign="middle" class="cl2"><a href="#none" onClick="javascript:showCurrencyInfo('getTotalCurrencyInfo')">查看</a></td>
    </tr>
    <tr style="display:none">
      <td align="center" valign="middle" class="clt">已用租币</td>
      <td align="center" valign="middle" class="cl1">0.0</td>
      <td align="center" valign="middle" class="cl1"><a href="#none" onClick="javascript:showCurrencyInfo('getUsedCurrencyInfo')">查看</a></td>
    </tr>
  </table>
</div>
<table width="540" border="0" cellspacing="0" cellpadding="0" class="amountlist">
  <tr>
    <td align="left" valign="middle" class="clt">类别</td>
    <td align="left" valign="middle" class="clt">合格个数</td>
    <td align="left" valign="middle" class="clt">获得租币</td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl1">注册验证</td>
    <td align="left" valign="middle" class="cl1" id="times1"></td>
    <td align="left" valign="middle" class="cl1" id="amount1"><%=BRegist %></td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl1">上传头像</td>
    <td align="left" valign="middle" class="cl1" id="times13"></td>
    <td align="left" valign="middle" class="cl1" id="amount13"><%=BUploadImg%></td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl2">好友注册（每累计达到五个）</td>
    <td align="left" valign="middle" class="cl2" id="times2"></td>
    <td align="left" valign="middle" class="cl2" id="amount2"><%=BRegistFriand%></td>
  </tr>
  <tr style="display:none">
    <td align="left" valign="middle" class="cl1">发布房间</td>
    <td align="left" valign="middle" class="cl1" id="times3"></td>
    <td align="left" valign="middle" class="cl1" id="amount3"></td>
  </tr>
  <tr style="display:none">
    <td align="left" valign="middle" class="cl2">首次预定（好友）</td>
    <td align="left" valign="middle" class="cl2" id="times4"></td>
    <td align="left" valign="middle" class="cl2" id="amount4"></td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl1">首次出租（好友）</td>
    <td align="left" valign="middle" class="cl1" id="times5"></td>
    <td align="left" valign="middle" class="cl1" id="amount5"><%=BFirstHire %></td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl2">好友预定（首次实付金额在300元以上）</td>
    <td align="left" valign="middle" class="cl2" id="times6"></td>
    <td align="left" valign="middle" class="cl2" id="amount6"><%=BReserveFriand%></td>
  </tr>
  <tr style="display:none">
    <td align="left" valign="middle" class="cl1">首次预订（自己）</td>
    <td align="left" valign="middle" class="cl1" id="times7"></td>
    <td align="left" valign="middle" class="cl1" id="amount7"></td>
  </tr>
  <tr style="display:none">
    <td align="left" valign="middle" class="cl2">首次出租（自己）</td>
    <td align="left" valign="middle" class="cl2" id="times8"></td>
    <td align="left" valign="middle" class="cl2" id="amount8"></td>
  </tr>
  <tr style="display:none">
    <td align="left" valign="middle" class="cl2">爱日租奖励</td>
    <td align="left" valign="middle" class="cl2" id="times9"></td>
    <td align="left" valign="middle" class="cl2" id="amount9"></td>
  </tr>
  <tr style="display:none">
    <td align="left" valign="middle" class="cl2">爱日租退款</td>
    <td align="left" valign="middle" class="cl2" id="times10"></td>
    <td align="left" valign="middle" class="cl2" id="amount10"></td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl2">订单完成赠送（自己）</td>
    <td align="left" valign="middle" class="cl2" id="times11"></td>
    <td align="left" valign="middle" class="cl2" id="amount11"><%=BGiftAfterOrder%></td>
  </tr>
  <tr>
    <td align="left" valign="middle" class="cl2">填写调研问卷</td>
    <td align="left" valign="middle" class="cl2" id="times12"></td>
    <td align="left" valign="middle" class="cl2" id="amount12"><%=BQuestionnaire%></td>
  </tr>
</table>
<p>&nbsp;</p>
    </div>
    </div>
    <div class="bottom"></div>
  </div>

<!--弹出窗口1-->
<div class="wj_popup_va" id="totalCurrency" style="display:none;">
<div class="close" style="float:right"> <a href="#none" onClick="javascript:document.getElementById('totalCurrency').style.display='none'">
<img src="/images/command_center/close_button.gif"/> </a> </div>
<h2>共获租币</h2>
<table id="totalCurrencyTable" width="600" border="0" cellspacing="0" cellpadding="0" class="wj-va-dt">
</table>
</div>

<!--弹出窗口2-->
<div class="wj_popup_va" id="usedCurrency" style="display:none">
<div class="close" style="float:right"> <a href="#none" onClick="javascript:document.getElementById('usedCurrency').style.display='none'">
	<img src="/images/command_center/close_button.gif"/></a>
</div>
<h2>已用租币</h2>
<table id="usedCurrencyTable" width="600" border="0" cellspacing="0" cellpadding="0" class="wj-va-dt">
</table>
</div>
  


	<!-- footer -->
	
<div id="footer">
  <p class="TxtEn">&copy; Copyright 2011 <a href="#">airizu.com 爱日租 版权所有</a>&nbsp;&nbsp;京ICP证110553 号
	 <br/>
	 <br/><img src="images/alipay.gif" width="123" height="40">&nbsp;&nbsp;
    <img src="images/tenpay.gif" width="96" height="40">&nbsp;&nbsp;    <img src="images/315.gif" width="89" height="40">    <img src="images/bluelogoair.gif"/></p>
</div>

	
	<!-- 人人网 -->
	<script type="text/javascript"
		src="http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp"></script>
	<script type="text/javascript">
    XN_RequireFeatures(["EXNML"], function()
    {
      XN.Main.init("778b70c51f284fd2a8f46cfa18e830a6", "/airizu/xd_receiver.html");
    });

    function startWaiting() {
		document.getElementById('waitingDiv').style.display = '';
    }
    
    function endWaiting() {
		document.getElementById('waitingDiv').style.display = 'none';
    }
</script>
	<!--end-->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F6bff5fb782ff877737f8bcf53145c13e' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>

</html>
